package cn.wyj.basic.controller;

import cn.wyj.basic.service.IEmailService;
import cn.wyj.basic.util.AjaxResult;
import cn.wyj.org.domain.EmailRegisterDto;
import cn.wyj.org.domain.PhoneRegisterDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/email")
public class EmailController {
    @Autowired
    private IEmailService iEmailService;

    /**
     * 邮箱注册
     *
     */
    @PostMapping("/zz")
    public AjaxResult emailRegister(@RequestBody @Valid EmailRegisterDto dto){

        iEmailService.emailRegister(dto);
//        System.out.println(1);
        return AjaxResult.me().success();
    }
}
